﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SIGERP_Presentacion
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {

        }

        private void salirToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void frmMain_Shown(object sender, EventArgs e)
        {
            frmLogin appLogin = new frmLogin();
            //Pongo el formulario como modal
            if (appLogin.ShowDialog() != DialogResult.OK)
            {
                this.Dispose();
            }
        }

        private void gestionarPaisesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in MdiChildren) form.Close();
            frmPais frm = new frmPais();
            //frm.WindowState = FormWindowState.Maximized;
            frm.MdiParent = this;
            frm.Show();
        }

        private void gestionarAreasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in MdiChildren) form.Close();
            frmArea frm = new frmArea();
            //frm.WindowState = FormWindowState.Maximized;
            frm.MdiParent = this;
            frm.Show();
        }

        private void gestionarTiposDeReclamoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in MdiChildren) form.Close();
            frmTipoReclamo frm = new frmTipoReclamo();
            //frm.WindowState = FormWindowState.Maximized;
            frm.MdiParent = this;
            frm.Show();

        }

        private void gestionarDepartamentoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in MdiChildren) form.Close();
            frmDepartamento frm = new frmDepartamento();
            //frm.WindowState = FormWindowState.Maximized;
            frm.MdiParent = this;
            frm.Show();
        }

        private void gestionarOrigenesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //foreach (Form form in MdiChildren) form.Close();
            //frmOrigen frm = new frmOrigen();
            ////frm.WindowState = FormWindowState.Maximized;
            //frm.MdiParent = this;
            //frm.Show();
        }

        private void gestionarProvinciasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in MdiChildren) form.Close();
            frmProvincia frm = new frmProvincia();
            //frm.WindowState = FormWindowState.Maximized;
            frm.MdiParent = this;
            frm.Show();
        }

        private void gestionarCiudadesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in MdiChildren) form.Close();
            frmCiudad frm = new frmCiudad();
            //frm.WindowState = FormWindowState.Maximized;
            frm.MdiParent = this;
            frm.Show();
        }

        private void gestionarUsuariosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in MdiChildren) form.Close();
            frmUsuario frm = new frmUsuario();
            //frm.WindowState = FormWindowState.Maximized;
            frm.MdiParent = this;
            frm.Show();
        }
    }
}
